{% import '_tree_table.html' as tree_table with context %}

{% set invert = ledger.fava_options['invert-income-liabilities-equity'] %}

{{ charts.interval_totals(g.interval, (ledger.options['name_income'], ledger.options['name_expenses']), label=_('Net Profit'), invert=invert) }}
{{ charts.interval_totals(g.interval, ledger.options['name_income'], label=_('Income'), invert=invert) }}
{{ charts.interval_totals(g.interval, ledger.options['name_expenses'], label=_('Expenses')) }}

{{ charts.hierarchy(ledger.options['name_income']) }}
{{ charts.hierarchy(ledger.options['name_expenses']) }}

<div class="row">
  <div class="column">
    {{ tree_table.tree(ledger.root_tree.get(ledger.options['name_income']), invert=invert) }}
  </div>
  <div class="column">
    {{ tree_table.tree(ledger.root_tree.get(ledger.options['name_expenses'])) }}
  </div>
  <div class="column">
    {{ tree_table.tree(ledger.root_tree.net_profit(ledger.options, _('Net Profit')), invert=invert) }}
  </div>
</div>
